//package com.ssfeng.youxia.aop;
//
//import org.aspectj.lang.JoinPoint;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.AfterThrowing;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//
//@Component
//@Aspect
//public class LogAop {
//
//	private static final Logger logger = LoggerFactory.getLogger(LogAop.class);
//
//	@Pointcut(" execution(* com.ssfeng.youxia.controller.*.*(..)) || execution(* com.ssfeng.youxia.services.*.*(..))")
//	public void logPointCut() {
//	}
//
//	@Around("logPointCut()")
//	public Object logAroudMethod(ProceedingJoinPoint joinPoint) throws Throwable {
//		String methodStr = joinPoint.getSignature().getName();
//		String className = joinPoint.getTarget().getClass().getName();
//		try {
//			logger.info("开始执行:{}.{}()", className, methodStr);
//			Object result=joinPoint.proceed();
//			logger.info("结束执行:{}.{}()", className, methodStr);
//			return result;
//		} catch (Throwable e) {
//			throw e;
//		}
//	}
//
//	@AfterThrowing(pointcut="logPointCut()",throwing = "e")
//	public Object throwExceptions(JoinPoint point, Throwable e) throws Throwable {
//		throw e;
//	}
//}
